import { createRouter, createWebHistory } from 'vue-router'

export const route = [
  {
    path: '/',
    name: 'home',
    component: () => import('../views/test.vue'),
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue'),
  },
  {
    path: '/flex',
    name: 'flex',
    component: () => import('../views/css/flex.vue'),
  },
  {
    path: '/line',
    name: 'line',
    component: () => import('../views/echarts/line.vue'),
  },
  {
    path: '/div',
    name: 'div',
    component: () => import('../views/css/div.vue'),
  },
  {
    path: '/separator',
    name: 'separator',
    component: () => import('../views/element/separator.vue'),
  },
  {
    path: '/layout',
    name: 'Layout',
    component: () => import('../views/element/Layout.vue'),
  },
  {
    path: '/icon',
    name: 'icon',
    component: () => import('../views/css/Icon.vue'),
  },
  {
    path: '/user',
    name: 'user',
    component: () => import('@/views/store/user.vue'),
  },
  {
    path: '/fetchState',
    name: 'fetchState',
    component: () => import('@/views/store/fetchState.vue'),
  },
  {
    path: '/UserList',
    name: 'UserList',
    component: () => import('@/views/axios/axiosUse.vue'),
  },
  {
    path: '/echarts',
    name: 'echarts',
    component: () => import('@/views/echarts/bar.vue'),
  },
  {
    path: '/echarts2',
    name: 'echarts2',
    component: () => import('@/views/echarts/pie.vue'),
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: route,
})

export default router
